package com.zzn.bookManage.dao;

import com.zzn.bookManage.pojo.Book;

import java.util.List;
import java.util.Map;

public interface BookDao {
    List<Book> listBooks(int limit,int offset);
    int listBooksCount();

    List<Book> listBorrowBooks(int uid,int limit,int offset);
    int listBorrowBooksCount(int uid);

    List<Book> listBookById(int bid,int limit,int offset);

    List<Book> listBooksByStringCondition(Map<String,String> conditions, boolean like,int limit,int offset);
    int listBooksByStringConditionCount(Map<String,String> conditions, boolean like);

    boolean updateBook(Book in);
    boolean deleteBook(Book in);
    boolean addBook(Book in);
    boolean updateBorrow(Book in);
}
